#ifndef _NNSLITE_H_
#define _NNSLITE_H_

#include "nnsliteglobal.h"
#include "nnslitemtree.h"
#include "nnsliteheapfile.h"
#include "nnslitebufferedheapfile.h"
#include "nnsliteobjectcontainer.h"

/** nnsliteStore  */
typedef struct nnsliteStore
{
	char name[NNSLITE_MAX_NAMELEN];
	char filename[NNSLITE_MAX_NAMELEN];
	nnsliteDistFunc distfunc;
	nnsliteHeapFS* heapFS;
	nnsliteMTree* mtree;
	nnsliteObjectContainerBase* objContainerBase;
	nnsliteBufferedHeapFile metaFile;
}nnsliteStore;


NNSLITE_RET nnsliteStoreCreate(nnsliteStore* store, nnsliteParameters* params);
NNSLITE_RET nnsliteStoreClose(nnsliteStore* store);
NNSLITE_RET nnsliteStoreOpen(nnsliteStore* store, const char* filename, nnsliteDistFunc distfunc);
NNSLITE_RET nnsliteStoreSave(nnsliteStore* store);
NNSLITE_RET nnsliteStoreNNSearch(nnsliteStore* store, const nnsliteObject* object, u32 top, nnsliteObject* results);
NNSLITE_RET nnsliteStorePrint(nnsliteStore* store, FILE* fp);
NNSLITE_RET nnsliteStoreInsert(nnsliteStore* store, nnsliteObject* object);

























#endif
